{include app:admin.inc.header}
<!--tmpl-resource-->
{include app:admin.inc.top}


<div class="container-fluid content-body">
	<div class="main">
		<!-- left side start-->
		{include admin.inc.menu}
		<!-- left side end-->


		<!-- main content start-->
		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">

				<!-- page breadcrumb start-->
				{include admin.inc.bread}
				<!-- page "breadcrumb end-->
				<!-- Nav tabs -->
				<ul class="nav nav-tabs">
					<li {if $id==''}class="active"{/if}><a {if $id==''}href="javascript:void(0);"{else}href="{$add_url}"{/if}><i class="glyphicon glyphicon-plus"></i> 添加公告表</a></li>
					<li><a href="{$index_url}" ><i class="glyphicon glyphicon-th-list"></i> 公告列表</a></li>
					{if $id != ''}<li class="active"><a href="javascript:void(0);"><i class="glyphicon glyphicon-edit"></i> 编辑公告</a></li>{/if}
					<li><a href="{$cate_url}"><i class="glyphicon glyphicon-th-list"></i> 公告类型列表</a></li>
					<li><a href="{url /admin/noticeCate/add}"><i class="glyphicon glyphicon-plus"></i>添加公告类型</a></li>
				</ul>
				<div class="inner-container">
					<form role="form" class="content-add-form form-horizontal" id="content-add-form" autocomplete="off">
						<!--tmpl-fields-->
						<!-- input -->
						<div  class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span>标题</label>
							<div class="col-sm-4">
								<input class="form-control col-sm-4" maxlength="20" name="data[title]" placeholder="标题" required cname="标题" value="{$item.title}" />
								<p class="help-block"></p>
							</div>
						</div>

						<!-- input -->
						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span>公告内容</label>
							<div class="col-sm-8"  style="overflow: hidden">
								<textarea required cname="公告内容" id="editor-content" maxlength="5000" class="form-control editor" style="width: 100%; height: 300px;" name="data[content]">{$item.content}</textarea>
								<p class="help-block"></p>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">公告类型</label>
							<div class="col-sm-4">
							<select class="form-control select2" name="data[cate_id]">
								{loop $noticeCate $val}
								<option {if $val['id']==$item['cate_id']}selected{/if} value="{$val.id}">{$val.name}</option>
								{/loop}
							</select>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">是否发布</label>
							<div class="col-sm-4">
								<input type="radio" name="data[release_status]" value="1" class="icheck"{if $item['release_status']==1}checked{/if}>是
								&nbsp;&nbsp;&nbsp;
								<input type="radio" name="data[release_status]" value="0" class="icheck" {if $item['release_status']==0}checked{/if}>否
							</div>
						</div>
						<p class="help-block"></p>

						<div class="form-group">
							<label class="col-sm-2 control-label">操作人</label>
							<div class="col-sm-4" style="padding-top: 4px;">{$adminName}</div>
						</div>
						<!--tmpl-assocfields-->
						<div class="btn-group btn-group-or">
							<a href="{if $id==''}{$do_add_url}{else}{$do_edit_url}?id={$id}{/if}" class="btn btn-primary ajaxproxy"
								proxy='{"method":"post", "location":"{$index_url}"}'>提交保存</a>
						</div>
					</form><!-- content add form -->
				</div>
			</div><!-- end of inner -->
		</section>
	</div>
</div>
{include admin.inc.footer}

<!--tmpl-script-->

<!-- pagescript -->
<script type="text/javascript">
	seajs.use("admin/information_noticeadd",function (parameter){
		/**--tmpl-templatejavascript--**/

		<!--tmpl-templatejavascript-->
		parameter.upload_url="{$upload_url}";
		parameter.image_search_url="{$image_search_url}";
		parameter.image_list_url="{$image_list_url}";
		parameter.init();
	});
</script>


<script id="assocpage" type="text/html">
<div class="text-right">
	<ul class="pagination blog-pagination">
		<li><a class="assoc-page" data-page="{[prev]}" href="javascript:void(0);">上一页</a></li>
		{[loop pages page]}

		<li ><a class="assoc-page" data-page="{[page]}" {[if curr == page]}class="active"{[/if]} href="javascript:void(0)">{[page]}</a></li>

		{[/loop]}
		<li><a class="assoc-page" href="javascript:void(0);" data-page="{[nexts]}">下一页</a></li>
	</ul>
</div>
</script>

</body>
</html>
